const { UDPClient } = require('dns2');

const resolve = UDPClient();

(async () => {
  const response = await resolve('baidu.com')
  console.log(response.answers);
})();